package com.example.dessert.service;

import com.example.dessert.entity.Favorite;

import java.util.List;

public interface FavoriteService {

    //查询是否已经收藏
    Favorite queryFavoriteBuyUserId(Long userId,Long productId);

    //保存收藏
    Long storeFavorite(Favorite favorite);

    //取消收藏
    int cancelFavorite(Long id);

    //收藏列表
    List<Favorite> queryFavoriteList(Long userId);

    List<Favorite> queryFavoritePage(Integer startPage, Integer pageSize,Long userId);

    //用户收藏数量
    Long queryFavoriteCount(Long userId);

    //根据ID取消收藏
    int deleteFavoriteBuyId(Long id);


}
